package com.hht.wblib.bean;

import com.hht.wblib.utils.GsonHelper;

/**
 * Author:chen'hu
 * Time:2025/1/3 10:27
 * Description:通用配置的Bean,当获取系统配置失败，启用本地配置
 */
public class UniversalBean {

    public static UniversalBean getInstance() {
        return SingletonHolder.INSTANCE;
    }

    private static class SingletonHolder {
        private static final UniversalBean INSTANCE = new UniversalBean();
    }

    /**
     * @return 获取鸿合newline的本地配置
     */
    public ConfigurationBean getHhtNewLineConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(0,
                "tw.com.newline.whiteboard",
                "tw.com.newline.whiteboard.android.MainActivity",
                true,
                "android.hht.action.whiteboard",
                "filePath");

        AnnotationBean annotationBean =
                new AnnotationBean(0,
                        "tw.com.newline.annotation",
                        "tw.com.newline.annotation.android.MainActivity",
                        true,
                        "android.hht.action.whiteboard",
                        "filePath");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }

    /**
     * @return 获取鸿合newline（批注更新为service）的本地配置
     */
    public ConfigurationBean getHhtNewUpdateLineConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(0,
                "tw.com.newline.whiteboard",
                "tw.com.newline.whiteboard.android.MainActivity",
                true,
                "android.hht.action.whiteboard",
                "filePath");

        AnnotationBean annotationBean =
                new AnnotationBean(0,
                        "com.hht.newline.annotation",
                        "com.hht.newline.annotation.AnnotationService",
                        false,
                        "",
                        "");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }


    /**
     * @return 获取鸿合oem的本地配置
     */
    public ConfigurationBean getHhtOemConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(0,
                "tw.com.newline.whiteboard",
                "tw.com.newline.whiteboard.android.MainActivity",
                true,
                "android.hht.action.whiteboard",
                "filePath");

        AnnotationBean annotationBean =
                new AnnotationBean(0,
                        "com.hht.annotation",
                        "com.hht.annotation.AnnotationService",
                        false,
                        "",
                        "");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }

    /**
     * @return 获取富创的本地配置
     */
    public ConfigurationBean getIstConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(1,
                "com.ist.whiteboard",
                "com.ist.whiteboard.MainActivity",
                true,
                "com.ist.START_ANNOTATION",
                "path");

        AnnotationBean annotationBean =
                new AnnotationBean(1,
                        "com.ist.whiteboard",
                        "com.ist.whiteboard.MainActivity",
                        false,
                        "com.ist.START_ANNOTATION",
                        "path");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }

    /**
     * @return 获取朗国的本地配置
     */
    public ConfigurationBean getLgConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(2,
                "com.xbh.whiteboard",
                "com.xbh.whiteboard.LaunchActivity",
                true,
                "com.xbh.intent.action.INSERT_IMAGE_TO_WHITEBOARD",
                "");

        AnnotationBean annotationBean =
                new AnnotationBean(2,
                        "com.xbh.whiteboard",
                        "com.xbh.whiteboard.annotation.service.SuspendService",
                        false,
                        "",
                        "");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }

    /**
     * @return 获取鸿合的本地配置
     */
    public ConfigurationBean getOptomaConfigurationBean() {

        WhiteBoardBean whiteBoardBean = new WhiteBoardBean(3,
                "com.optoma.whiteboard",
                "com.optoma.whiteboard.cb.MainActivity",
                true,
                "",
                "");

        AnnotationBean annotationBean =
                new AnnotationBean(3,
                        "com.optoma.annotation",
                        "com.optoma.annotation.AnnotationService",
                        false,
                        "",
                        "");
        return new ConfigurationBean(whiteBoardBean, annotationBean);
    }
}
